package cn.com.bluemoon.daps.model.dto;

import cn.com.bluemoon.daps.model.entity.DapDataModelSubordinateKey;
import cn.com.bluemoon.daps.model.entity.DapDataModelTableField;
import cn.com.bluemoon.daps.model.entity.DapDataModelTablePartition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class DapDataModelTableInfoDto {

    @ApiModelProperty(value = "表id")
    private String tableId;

    @ApiModelProperty(value = "业务描述")
    private String businessDesc;

    @ApiModelProperty(value = "数仓模型中对应的主题分类id")
    private String categoryId;

    @ApiModelProperty(value = "关联模型id")
    private String dataModelId;

    @ApiModelProperty(value = "数据源id")
    private String dataSourceId;

    @ApiModelProperty(value = "表英文名")
    private String engName;

    @ApiModelProperty(value = "表中文名")
    private String name;

    @ApiModelProperty(value = "数仓模型中对应的层级类型：从1~5分别对应OD、DWD、DIM、DWS、ADS")
    private Integer warehouseLevelType;

    @ApiModelProperty(value = "表更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "修改状态")
    private Integer editStatus;

    @ApiModelProperty(value = "表pid", hidden = true)
    private String pid;

    @ApiModelProperty(value = "字段列表")
    private List<DapDataModelTableField> fieldList;

    @ApiModelProperty(value = "索引列表")
    private List<DapDataModelSubordinateKey> keyList;

    @ApiModelProperty(value = "分区列表")
    private List<DapDataModelTablePartition> partitionList;
}
